<?php
	class OrdersModel extends RelationModel{
		protected $tableName = 'orders';
		protected $_link = array(
			'cars'	=>  array(
				'mapping_type' =>  BELONGS_TO,
				'foreign_key'  =>  'car_num'				
			),
			'employs'	=>	array(
				'mapping_type'	=>	BELONGS_TO,
				'foreign_key'	=>	'emp_id',
				'mapping_fields' => 'empname,scores,orders,phone,emp_pic',
				'as_fields'		=>	'empname,scores,orders,phone,emp_pic'
			)
		);
	
	}